Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add feature print configuration issue 172 #203

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

zwdOr20
Copy link

@zwdOr20 zwdOr20 commented Apr 8, 2021

In this PR I tried to implement a solution for the open issue issue, I'm fully open for any suggestions and enhancement !
Ps : I didn't want to write unit tests for my code before discussing the PR!
Implemented use case : yuniql config || yuniql config -o json

zwdOr20 added 4 commits April 5, 2021 23:48
- Add ConfigOption.cs and BaseConfigOption.cs  files for config cmd
options.
- Add RunConfigOption method to handle config cmd use case.

closes rdagumampan#172
Implment RunConfigurationOption method to handle config command use case.

 closes rdagumampan#172
- add IPrinter interface
- add JsonPrinter class

closes rdagumampan#172
- Choose text format for printing configuration variable information.
- Add
json option (by default the format is table/rows)

closes closes rdagumampan#172
Copy link
Owner

@rdagumampan rdagumampan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @zwdOr20, thank you very much for your interest in yuniql and contribution.
Please see my comments and resubmit changes when you are ready. Have a nice day!

yuniql-cli/BaseConfigOption.cs Outdated Show resolved Hide resolved
@@ -10,7 +10,7 @@ public class BaseOption

//yuniql <command> -d | --debug
[Option('d', "debug", Required = false, HelpText = "Print debug information including all raw scripts.")]
public bool IsDebug { get; set; }
public bool? IsDebug { get; set; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why you think this has to be changed. I'm afraid it may introduce bugs not directly related to feature we're implementing. :)

Copy link
Author

@zwdOr20 zwdOr20 Apr 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The raison why I made it nullable is I want to differentiate between two states :

  1. IsDebug is false && the value wasn't specified by the user (default value for boolean is False doc)
  2. When the user specify --debug false

In both cases IsDebug set to false but the source of this false is different

yuniql-cli/BasePlatformOption.cs Show resolved Hide resolved
yuniql-cli/CommandLineService.cs Show resolved Hide resolved
yuniql-cli/JsonPrinter.cs Show resolved Hide resolved
yuniql-cli/CommandLineService.cs Show resolved Hide resolved
yuniql-core/Source.cs Outdated Show resolved Hide resolved
yuniql-platforms/postgresql/PostgreSqlBulkImportService.cs Outdated Show resolved Hide resolved
- change data-type option name to output
- change Source enum values fomat to
ALLCAPS
- chekout  yuniql-platforms/postgresql/PostgreSqlBulkImportService.cs
to master.
@sonarcloud
Copy link

sonarcloud bot commented Apr 10, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@zwdOr20 zwdOr20 requested a review from rdagumampan April 11, 2021 22:42
@rdagumampan rdagumampan reopened this Dec 20, 2021
@sonarcloud
Copy link

sonarcloud bot commented Dec 20, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants